home *** CD-ROM | disk | FTP | other *** search
Modula Definition | 1996-06-21 | 2.6 KB | 86 lines | [TEXT/MEDT] |
- DEFINITION MODULE MatWOut;
-
- (*******************************************************************
-
- Module MatWOut (Version 1.0)
-
- Copyright ©1993 by Olivier Roth, Andreas Fischlin,
- and Swiss Federal Institute of Technology Zürich ETHZ
-
- Purpose: Flexible textual in-/output of matrices
- to windows.
-
- Remarks: This module is part of the Mat-library, which forms
- part of the RAMSES package.
-
- Programming
-
- o Programming and Implementation
- O. Roth 14.11.89
- A. Fischlin 28/Mai/93
-
- Systems Ecology Group
- Swiss Federal Institute of Technology Zurich ETHZ
- Department of Environmental Sciences
- Grabenstr. 3
- CH-8952 Schlieren/Zurich
- Switzerland
-
- Last revision of definition: 1/Jun/93 af
-
- *******************************************************************)
-
- FROM DMConversions IMPORT RealFormat;
-
- FROM Matrices IMPORT Matrix;
-
-
-
- TYPE
- MatFormat = RECORD
- realF : RealFormat;
- len, dec : CARDINAL;
- separator: ARRAY[0..63] OF CHAR;
- crCol : INTEGER;
- eOM : ARRAY[0..63] OF CHAR;
- END(*RECORD*);
-
- (* MatFormat describes the format in which a matrix will be written
- * to the current output window of the 'Dialog Machine'. "realF"
- * will be applied to every number, "len" stands for the length of
- * the field for the real number (including decimal digits and
- * point), "dec" stands for the number of decimal digits,
- * "separator" is a string which is written after each matrix
- * element except at the end of a line (cr), and "crCol" specifies
- * the matrix column after which a carriage return (cr) is
- * inserted. If "crCol"is negative or 0 the matrix's number of
- * columns is taken. "eOM" stands for 'end of matrix' and may
- * contain any string which is written after the matrix' elements
- * have been written. *)
-
-
- VAR
- standardO : MatFormat; (* read only var!!!
- is set to: fix, 10, 3, <tab>, 0, "EOM"<cr> *)
-
-
- PROCEDURE SetMatFormat ( mf: MatFormat );
- PROCEDURE GetMatFormat ( VAR mf: MatFormat );
- (* Sets the MatFormat to be used for all subsequent writing
- routines. The default format is standardO. *)
-
-
-
- PROCEDURE WriteMatrix( m: Matrix );
-
- PROCEDURE WriteRow ( m: Matrix; rowNr: INTEGER );
-
- PROCEDURE WriteCol ( m: Matrix; colNr: INTEGER );
-
- PROCEDURE WriteEle ( m: Matrix; row,col:INTEGER );
-
- (* All writing routines use routines from DMWindIO *)
-
-
- END MatWOut.